import * as React from 'react';
import { connect, IAdminModel, history } from 'umi';
import { Button } from 'antd'
export interface IAppProps {
}

function App (props: IAppProps) {
  const exit = () => {
    localStorage.clear()
    history.push('/login')
  }
  return (
    <header>
      <span>{ localStorage.getItem('adminname') }</span>
      <Button style={{'border': 'none'}} onClick = { exit }>退出</Button>
    </header>
  );
}

export default App